package bud.mobile.dao;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import bud.vo.FriendDTO;
import bud.vo.MemberDTO;
import bud.vo.ShopDTO;

public class MobileMemberDaoiBatis extends SqlMapClientDaoSupport implements IMobileMemberDao{

	@Override
	public int insertMember(MemberDTO member) {
		return getSqlMapClientTemplate().update("Member.insertMember", member);
	}

	@Override
	public int deleteMember(MemberDTO member) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateMember(MemberDTO member) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public MemberDTO getMember(Integer mem_no) {
		return (MemberDTO)getSqlMapClientTemplate().queryForObject("Member.getMember", mem_no);
	}

	@Override
	public MemberDTO getMemberByEmail(String mem_email) {
		return (MemberDTO)getSqlMapClientTemplate().queryForObject("Member.getMemberByEmail", mem_email);
	}
	
	

	@Override
	public ShopDTO getShop(Integer sh_no) {
		return (ShopDTO)getSqlMapClientTemplate().queryForObject("Shop.getShop", sh_no);
	}

	@Override
	public List<ShopDTO> getShopList() {
		return (List<ShopDTO>)getSqlMapClientTemplate().queryForList("Shop.getShop");
	}



}
